﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="pgDOficios.aspx.cs" Inherits="EGuayas.Web.EGlobal.dma.pgDOficios" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<%@ Register Src="~/Licenciamiento/dma/wucFirma.ascx" TagPrefix="uc2" TagName="wucFirma" %>
<%@ Register Src="~/EGlobal/ucInfoDocumentos.ascx"  TagPrefix="uc1" TagName="ucInfoDocumentos" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link  href="~/Resources/css/Style.css"  rel="stylesheet" />
    <!-- Load Ext JS --> 
    <script src="../../Resources/js/Global.js"></script>
   
</head>
<body>  
    <form id="Form1" runat="server"> 
        <ext:ResourceManager ID="pgIdCategManager" runat="server" DirectMethodNamespace="DMRevizar" />     
        <uc1:ucInfoDocumentos runat="server" id="ucInfoDocumentos" />
        <ext:Viewport ID="Viewport1" runat="server" Layout="BorderLayout">
            <Items>  
              <ext:FormPanel ID="FormPanel4" runat="server" Region="Center" Layout="VBoxLayout">
                <LayoutConfig>
                    <ext:VBoxLayoutConfig Align="Stretch" />
                </LayoutConfig> 
                   <Items>       
            <%--:: Venana popup --%>
            <ext:Window
            ID="winAprobar"
            runat="server"
            Height="450"
            Width="650"
            ButtonAlign="Center"
            BodyStyle="background-color: #fff;"
            BodyPadding="5"
            Hidden="true"
            CloseAction="Hide"
            Plain="true"                 
            HeaderPosition="Bottom"
           
            Layout="BorderLayout">
            <Items>
                <ext:Panel ID="plDocumentoApro" runat="server"
                    Region="Center"
                    Icon="Zoom"
                    BodyPadding="6"
                    Header="true"
                    ButtonAlign="Left"
                    Layout="AnchorLayout">
                    <Items>
                         <ext:Hidden Text="" ID="hdRuta" Name="Ruta" runat="server"></ext:Hidden>  
                    </Items>
                    <Buttons>
                        <ext:Button runat="server" Text="Descargar" >
                             <DirectEvents>                       
                                <Click OnEvent="btnDowload_Click">
                                    <ExtraParams>
                                        <ext:Parameter Name="Ruta" Value="#{hdRuta}.getValue()" Mode="Raw" />                             
                                    </ExtraParams>                                    
                                    <Confirmation ConfirmRequest="True" Message="Esta seguro de realizar esta acción?" Title="Aviso"></Confirmation>
                                </Click>                        
                            </DirectEvents>
                        </ext:Button>
                    </Buttons>
                </ext:Panel>
                <ext:FormPanel
                    ID="forPanelApro"
                    Region="East"
                    Split="true"
                    runat="server"
                    Width="330"
                    Title="Revizar"
                    BodyPadding="5"
                    Icon="NoteEdit"
                    Collapsible="true"
                    Layout="FitLayout">
                    <FieldDefaults LabelWidth="75" LabelPad="20" LabelSeparator="" />
                    <Items>
                        <ext:Panel ID="Panel3" runat="server" Border="false" Layout="Form" ColumnWidth=".5" LabelAlign="Top">
                            <Defaults>
                             
                                <ext:Parameter Name="MsgTarget" Value="side" />
                            </Defaults>
                            <Items>       
                               <ext:Hidden Text="" ID="hddnId" Name="Id" runat="server"></ext:Hidden>  
                               <ext:Hidden Text="" ID="hddnDocUpId" Name="ArchivoId" runat="server"></ext:Hidden>                       
                               <ext:RadioGroup ID="rdgSiNoApro"  AllowBlank="false"
                                    GroupName="rdgSiNo_group"
                                    runat="server"
                                    Anchor="none"
                                    FieldLabel="Corregir">
                                    <LayoutConfig>
                                        <ext:CheckboxGroupLayoutConfig AutoFlex="false" />
                                    </LayoutConfig>
                                    <Defaults>
                                        <ext:Parameter Name="name" Value="ccType" />
                                        <ext:Parameter Name="style" Value="margin-right:15px;" />
                                    </Defaults>
                                    <Items>
                                        <ext:Radio ID="Radio3"
                                            runat="server"
                                            InputValue="S"
                                            BoxLabel="Si" />
                                        <ext:Radio ID="Radio4"
                                            runat="server"
                                            InputValue="N"
                                            BoxLabel="No" />
                                        <ext:Radio ID="Radio6"
                                            runat="server"
                                            Hidden="true"
                                            InputValue="C"
                                            FieldLabel="Corregido" />
                                    </Items>
                                    <Listeners>
                                        <Change  Handler="pgFnOficioD.ChangeRadioOpc( newValue, oldValue);"></Change>
                                    </Listeners>
                                </ext:RadioGroup>
                                <ext:TextArea runat="server" ID="txtCometarioRevizar"   AllowBlank="false" FieldLabel="Comentario" Height="190" AutoScroll="true"></ext:TextArea>
                                <ext:Hidden Text="" ID="hddnDocUpVers" Name="Version" runat="server"></ext:Hidden>
                                <ext:Hidden Text="" ID="hddnDocUpRef" Name="Referencia" runat="server"></ext:Hidden>
                                <ext:FileUploadField
                                ID="FileUploadDocUp"                      
                                runat="server"
                                EmptyText="Seleccione documento"
                                FieldLabel="Documento"
                                ButtonText=""
                                Icon="ImageAdd">                                                                                            
                              </ext:FileUploadField>
                             
                                </Items>                     
                         </ext:Panel>
                    </Items>
                    <Listeners>
                        <ValidityChange Handler="#{btnAprobar}.setDisabled(!valid);" />
                    </Listeners>
                </ext:FormPanel>

            </Items>
            <Buttons>
                <ext:Button ID="btnAprobar" runat="server" Text="Aceptar" 
                    FormBind="true">
                    <DirectEvents>                       
                        <Click OnEvent="btnAprobar_Click" 
                             Before="return pgFnOficioD.checkExtensionDoc();"
                                           Failure="Ext.Msg.show({ 
                                                    title   : 'Error', 
                                                    msg     : 'Error', 
                                                    minWidth: 200, 
                                                    modal   : true, 
                                                    icon    : Ext.Msg.ERROR, 
                                                    buttons : Ext.Msg.OK 
                                                });">
                            <ExtraParams>
                                 <ext:Parameter Name="Id" Value="#{hddnId}.getValue()" Mode="Raw" />
                                <ext:Parameter Name="hddnDocUpVers" Value="#{hddnDocUpVers}.getValue()" Mode="Raw" />
                                <ext:Parameter Name="IdArchivo" Value="#{hddnDocUpId}.getValue()" Mode="Raw" />
                                <ext:Parameter Name="hddnDocUpRef" Value="#{hddnDocUpRef}.getValue()" Mode="Raw" />  
                                <ext:Parameter Name="Revizar" Value="#{rdgSiNoApro}.items.get(0).getGroupValue()" Mode="Raw" />
                                <ext:Parameter Name="Comentarios" Value="#{txtCometarioRevizar}.getValue()" Mode="Raw" /> 
                            </ExtraParams>
                            <EventMask ShowMask="true"></EventMask>
                            <Confirmation ConfirmRequest="True" Message="Esta seguro de realizar esta acción?" Title="Aviso"></Confirmation>
                        </Click>                        
                    </DirectEvents>
                </ext:Button>
              
                <ext:Button ID="Button1" runat="server" Text="Cancelar" OnClientClick="AppGlobalJs.closeWin(#{winAprobar})">
                    <Listeners>
                    </Listeners>
                </ext:Button>
            </Buttons>
            <Listeners>
                <BeforeHide Handler="#{forPanelApro}.getForm().reset();"></BeforeHide>
            </Listeners>
        </ext:Window>
            <ext:TabPanel ID="TabPanel1" runat="server"  Flex="1">
                <Items>
                     <ext:FormPanel ID="FormPanel1" runat="server" Region="Center" Layout="Fit"     Title  ="Documentos a Revizar" 
                                    Icon="EmailTransfer">
                           
                            <Items>  
                                            <ext:GridPanel
                                                    ID="gpDocumentosLoad"
                                                    runat="server"                                           
                                                    Height="90">
                                                    <Store>
                                                        <ext:Store ID="Store2" runat="server">
                                                            <Model>
                                                                <ext:Model ID="Model2" runat="server" IDProperty="Id">
                                                                    <Fields>
                                                                        <ext:ModelField Name="Id" Type="String" /> 
                                                                        <ext:ModelField Name="Fecha" Type="Date" />
                                                                        <ext:ModelField Name="Numero" Type="String" />
                                                                        <ext:ModelField Name="Descripcion" Type="String" />
                                                                        <ext:ModelField Name="Estado" Type="String" />
                                                                        <ext:ModelField Name="Comentario" Type="String" /> 
                                                                        <ext:ModelField Name="Referencia" Type="String" />   
                                                                        <ext:ModelField Name="ArchivoId" Type="String" /> 
                                                                        <ext:ModelField Name="Version" Type="Int" />
                                                                          <ext:ModelField Name="Ruta" Type="String" /> 
                                                                    </Fields>
                                                                </ext:Model>
                                                            </Model>                                      
                                                            <Proxy>
                                                                <ext:PageProxy DirectFn="DMRevizar.BindDataRevizar">
                                                                    <Reader>
                                                                        <ext:JsonReader></ext:JsonReader>
                                                                    </Reader>
                                                                </ext:PageProxy>
                                                            </Proxy>
                                                        </ext:Store>
                                                    </Store>
                                                    <ColumnModel ID="ColumnModel2" runat="server">
                                                        <Columns>
                                                            <ext:Column  runat="server" Text="Id" DataIndex="Id" Flex="1" Hidden="true"/>
                                                            <ext:DateColumn ID="DateColumn3" runat="server" Text="Fecha" Width="95" DataIndex="Fecha" Format="dd-m-yy" />                                                        
                                                            <ext:Column ID="Column12"  runat="server" Text="Número" DataIndex="Numero"/>
                                                            <ext:Column ID="Column13"  runat="server" Text="Descripción" DataIndex="Descripcion" Flex="1"/> 
                                                            <ext:Column ID="Column14"  runat="server" Text="Estado" DataIndex="Estado" >
                                                                <Renderer Fn="pgFnOficioD.ChangeLabel" />
                                                        </ext:Column>
                                                         
                                                          
                                                            <ext:Column ID="Column1" runat="server">
                                                                <Commands>
                                                                    <ext:ImageCommand CommandName="RevApro" Icon="FolderGo" Text="Revizar">
                                                                
                                                                    </ext:ImageCommand>
                                                                </Commands>                                                             
                                                                <Listeners>
                                                                    <Command Handler="pgFnOficioD.RevApro(record);"></Command>
                                                                </Listeners>                                                               
                                                            </ext:Column>                                                                               
                                                        </Columns>                                                    
                                                    </ColumnModel>
                                                    <Plugins>
                                                        <ext:RowExpander ID="RowExpander1" runat="server">
                                                            <Loader ID="Loader1" runat="server" DirectMethod="#{DirectMethods}.GetSubDoc" Mode="Component">
                                                                <LoadMask ShowMask="true" />
                                                                <Params>
                                                                    <ext:Parameter Name="id" Value="this.record.data.Referencia" Mode="Raw" />
                                                                </Params>
                                                            </Loader>
                                                        </ext:RowExpander>
                                                    </Plugins>   
                                                     <Features>
                                                            <ext:GridFilters runat="server" ID="GridFilters1" Local="true" MenuFilterText="Filtrar por">
                                                                <Filters>
                                                                    <ext:StringFilter DataIndex="Numero"  EmptyText="Número"/>
                                                                                                             
                                                                    <ext:DateFilter DataIndex="Fecha" AfterText="Despues de" BeforeText="Antes de"  OnText="En">
                                                                        <DatePickerOptions runat="server" TodayText="Ahora" />
                                                                    </ext:DateFilter> 
                                                                </Filters>
                                                            </ext:GridFilters>
                                                  </Features>                                                           
                                                </ext:GridPanel>
                                                  
                          
                            </Items>
                       
                           <BottomBar>
                             <ext:StatusBar 
                                    ID="StatusBar2" 
                                    runat="server"
                                    StatusAlign="Left">
                                    <Items>                                
                                        <ext:ToolbarTextItem ID="ToolbarTextItem1" runat="server" Text="" Cls="ux-bold-text-item"  Margin="15"/>
                                    </Items>
                                </ext:StatusBar>
                            </BottomBar>
               </ext:FormPanel>
                     <ext:FormPanel ID="FormPanel2" runat="server" Region="Center" Layout="Fit"  Title  ="Documentos Revizados" 
                                Icon ="EmailOpen" >                       
                        <Items>                                    
                             
                                            <ext:GridPanel
                                                ID="gpDocRevizados"
                                                runat="server"                                           
                                                Height="90">
                                                <Store>
                                                    <ext:Store ID="Store1" runat="server">
                                                        <Model>
                                                            <ext:Model ID="Model1" runat="server" IDProperty="Id">
                                                                <Fields>
                                                                    <ext:ModelField Name="Id" Type="String" /> 
                                                                        <ext:ModelField Name="Fecha" Type="Date" />
                                                                        <ext:ModelField Name="Numero" Type="String" />
                                                                        <ext:ModelField Name="Descripcion" Type="String" />
                                                                        <ext:ModelField Name="Estado" Type="String" />
                                                                        <ext:ModelField Name="Comentario" Type="String" /> 
                                                                        <ext:ModelField Name="Referencia" Type="String" />   
                                                                        <ext:ModelField Name="ArchivoId" Type="String" /> 
                                                                        <ext:ModelField Name="Ruta" Type="String" /> 
                                                                        <ext:ModelField Name="Version" Type="Int" />
                                                                </Fields>
                                                            </ext:Model>
                                                        </Model>                                      
                                                        <Proxy>
                                                            <ext:PageProxy DirectFn="DMRevizar.BindDataRevizados">
                                                                <Reader>
                                                                    <ext:JsonReader></ext:JsonReader>
                                                                </Reader>
                                                            </ext:PageProxy>
                                                        </Proxy>
                                                    </ext:Store>
                                                </Store>
                                                <ColumnModel ID="ColumnModel1" runat="server">
                                                    <Columns>
                                                        <ext:Column ID="Column2"  runat="server" Text="Id" DataIndex="Id" Flex="1" Hidden="true"/>
                                                         <ext:Column ID="Column3"  runat="server" Text="Número" DataIndex="Numero" Flex="1"/>
                                                        <ext:Column ID="Column4"  runat="server" Text="Decripción" DataIndex="Descripcion" /> 
                                                        <ext:Column ID="Column7"  runat="server" Text="Comentario" DataIndex="Comentario" Flex="1"/> 
                                                        <ext:Column ID="Column9"  runat="server" Text="Estado" DataIndex="Estado" >
                                                                <Renderer Fn="pgFnOficioD.ChangeLabel" />
                                                        </ext:Column>
                                                        <ext:DateColumn ID="DateColumn1" runat="server" Text="Fecha" Width="95" DataIndex="Fecha" Format="dd-m-yy" />
                                                        <ext:Column ID="Column6"  runat="server">
                                                        <Commands>
                                                            <ext:ImageCommand CommandName="View" Icon="Zoom" Text="Vizualizar">
                                                                <ToolTip Text="Vizualizar" />
                                                            </ext:ImageCommand>
                                                        </Commands>
                                       
                                                        <Listeners>
                                                                <Command Handler="AppGlobalJs.showPdf('../../..',record.data.Ruta);" />
                                                        </Listeners>
                                                    </ext:Column>  
                                                    <ext:Column ID="Column11" runat="server">
                                                                <Commands>
                                                                    <ext:ImageCommand CommandName="RevApro" Icon="FolderGo" Text="Revizar">                                                                
                                                                    </ext:ImageCommand>
                                                                </Commands>                                                               
                                                                <Listeners>
                                                                    <Command Handler="pgFn.RevApro(record);"></Command>
                                                                </Listeners>                                                              
                                                     </ext:Column>                                                                      
                                                    </Columns>                                                    
                                                </ColumnModel>
                                                <Plugins>
                                                    <ext:RowExpander ID="RowExpander2" runat="server">
                                                        <Loader ID="Loader2" runat="server" DirectMethod="#{DirectMethods}.GetSubDoc" Mode="Component">
                                                            <LoadMask ShowMask="true" />
                                                            <Params>
                                                                <ext:Parameter Name="id" Value="this.record.data.Referencia" Mode="Raw" />
                                                            </Params>
                                                        </Loader>
                                                    </ext:RowExpander>
                                                </Plugins>                                                              
                                            </ext:GridPanel>                                          
                          
                        </Items>
                       
                       <BottomBar>
                         <ext:StatusBar 
                                ID="StatusBar1" 
                                runat="server"
                                StatusAlign="Left">
                                <Items>                                
                                    <ext:ToolbarTextItem ID="ToolbarTextItem2" runat="server" Text="" Cls="ux-bold-text-item"  Margin="15"/>
                                </Items>
                            </ext:StatusBar>
                        </BottomBar>
                    </ext:FormPanel>
                     <ext:FormPanel ID   ="FormPanel3" runat="server" Region="Center" Layout="Fit"     Title  ="Documentos Aprobados" 
                                    Icon ="EmailStart">
                            <Items>  
                                 <ext:Hidden runat="server" ID="Hidden1" Text=""></ext:Hidden>    
                                 <ext:Hidden runat="server" ID="Hidden2" Text=""></ext:Hidden>                         
                                
                                                <ext:GridPanel
                                                    ID="gpDocComentarios"
                                                    runat="server"                                           
                                                    Height="90">
                                                    <Store>
                                                        <ext:Store ID="Store3" runat="server">
                                                            <Model>
                                                                <ext:Model ID="Model3" runat="server" IDProperty="Id">
                                                                    <Fields>
                                                                        <ext:ModelField Name="Id" Type="String" /> 
                                                                        <ext:ModelField Name="Fecha" Type="Date" />
                                                                        <ext:ModelField Name="Numero" Type="String" />
                                                                        <ext:ModelField Name="Descripcion" Type="String" />
                                                                        <ext:ModelField Name="Estado" Type="String" />
                                                                        <ext:ModelField Name="Comentario" Type="String" /> 
                                                                        <ext:ModelField Name="Referencia" Type="String" />   
                                                                        <ext:ModelField Name="ArchivoId" Type="String" /> 
                                                                        <ext:ModelField Name="Version" Type="Int" />
                                                                          <ext:ModelField Name="Ruta" Type="String" /> 
                                                                    </Fields>
                                                                </ext:Model>
                                                            </Model>                                      
                                                            <Proxy>
                                                                <ext:PageProxy DirectFn="DMRevizar.BindDataComentario">
                                                                    <Reader>
                                                                        <ext:JsonReader></ext:JsonReader>
                                                                    </Reader>
                                                                </ext:PageProxy>
                                                            </Proxy>
                                                        </ext:Store>
                                                    </Store>
                                                    <ColumnModel ID="ColumnModel3" runat="server">
                                                        <Columns>
                                                            <ext:DateColumn ID="DateColumn2" runat="server" Text="Fecha" Width="95" DataIndex="Fecha" Format="dd-m-yy" />
                                                            <ext:Column ID="Column5"  runat="server" Text="Id" DataIndex="Id" Flex="1" Hidden="true"/>
                                                            <ext:Column ID="Column8"  runat="server" Text="Número" DataIndex="Numero" Flex="1"/>
                                                            <ext:Column ID="Column10"  runat="server" Text="Decripción" DataIndex="Descripcion" /> 
                                                            <ext:Column ID="Column15"  runat="server" Text="Estado" DataIndex="Estado" >
                                                                        <Renderer Fn="pgFnOficioD.ChangeLabel" />
                                                                </ext:Column>
                                                             </Columns>                                                    
                                                    </ColumnModel>
                                                    <Plugins>
                                                        <ext:RowExpander ID="RowExpander3" runat="server">
                                                            <Loader ID="Loader3" runat="server" DirectMethod="#{DirectMethods}.GetSubDoc" Mode="Component">
                                                                <LoadMask ShowMask="true" />
                                                                <Params>
                                                                    <ext:Parameter Name="id" Value="this.record.data.Referencia" Mode="Raw" />
                                                                </Params>
                                                            </Loader>
                                                        </ext:RowExpander>
                                                    </Plugins>                                                              
                                                </ext:GridPanel>                                                  
                          
                            </Items>                       
                           <BottomBar>
                             <ext:StatusBar 
                                    ID="StatusBar3" 
                                    runat="server"
                                    StatusAlign="Left">
                                    <Items>                                
                                        <ext:ToolbarTextItem ID="ToolbarTextItem3" runat="server" Text="" Cls="ux-bold-text-item"  Margin="15"/>
                                    </Items>
                                </ext:StatusBar>
                            </BottomBar>
               </ext:FormPanel>
              </Items>
            </ext:TabPanel>
            </Items> 
         </ext:FormPanel>
        </Items>
       </ext:Viewport>
        <%--  Wun Firma --%>       
        <uc2:wucFirma runat="server" ID="wucFirma" />
        <%--  Wun Firma --%>
    
    </form>
    <ext:XScript ID="XScript1" runat="server">
        <script type="text/javascript">
            var pgFnOficioD = new Object();
            pgFnOficioD.myPanel = null;
            pgFnOficioD.ChangeLabel= function (value) {
                try 
                { 
                    var template  = '<span style="color:{0};">{1}</span>';
                    var valReturn = '';
                    var valColor  = 0;
                    switch(value)
                    {
                        case "R": valReturn = 'Enviado a Revisión'; valColor  =1; break;
                        case "S": valReturn = 'Revizado'; break;
                        case "N": valReturn = 'Aprobado'; valColor  =1;break;
                     
                    }
                    return Ext.String.format(template, (valColor > 0) ? "green" : "red", valReturn);
                }
                catch (jsbug){
                    AppGlobalJs.showBug("pgFnOficioD.ChangeLabel: " + jsbug);
                }
            };
           
             
            pgFnOficioD.RevApro= function (record) {
                try
                { 
                    var myPanel = null;
                    var myPanelContent = #{plDocumentoApro};
                    if (myPanelContent != null) {
                        myPanelContent.remove('pnlviewddoc_1', false);
                        myPanel = myPanelContent.add(new Ext.Panel({
                            id: 'pnlviewddoc_1',
                            border: false,
                            anchor: '100% 100%',
                   
                            loader:
                             {
                                 loadMask:
                                     {
                                         showMask: false
                                     },
                                 renderer: "frame",
                                 url:"../../pgDetailPdf.aspx?idx= "+ record.data.Ruta
                             },
                            bodyPadding: 6,
                            closable: false,

                        }));
                    }
                    #{hdRuta}.setValue(record.get('Ruta'));
                    #{forPanelApro}.getForm().loadRecord(record); 
                    #{rdgSiNoApro}.setValue({rdgSiNo_group: record.get('AprobadoRevision')});
                    AppGlobalJs.showWin(#{winAprobar});
                } catch (jsbug) {
                    AppGlobalJs.showBug(" pgFnOficioD.RevApro: " + jsbug)
                }
            };            
            //
            pgFnOficioD.ChangeRadioOpc  = function (newValue, oldValue) {
                try
                {   
                    #{txtCometarioRevizar}.setValue("");
                    switch(newValue.rdgSiNo_group)
                    {
                        case "S":                        
                            #{txtCometarioRevizar}.allowBlank =false;
                            #{FileUploadDocUp}.allowBlank =false;
                            #{FileUploadDocUp}.show();
                            break;
                        case "N": 
                            #{txtCometarioRevizar}.allowBlank =true;    
                            #{FileUploadDocUp}.allowBlank  =true; 
                            #{FileUploadDocUp}.hide();
                            break;
                    }

                } catch (jsbug) {
                    AppGlobalJs.showBug("pgFnOficioD.ChangeRadioOpc: " + jsbug)
                }
            };   
            //Chequea version .doc
            pgFnOficioD.checkExtensionDoc=function() 
            {
               
                var flag     = true;
                var value    = #{FileUploadDocUp}.getValue().toLowerCase();
                if (value!="")
                flag  = (value.match( '\.doc$')!=null|| value.match("\.docx$")!=null);                
                if (flag==false) {
                    Ext.Msg.show({
                        title: 'Error',
                        msg: AppLabelGlobalJs.pg_format_doc,
                        buttons: Ext.Msg.ERROR,                   
                        animEl: 'elId'
                    });
                }
                var done =#{forPanelApro}.getForm().isValid();
                if (done && flag)
                {
                    if (value!="")
                        Ext.Msg.wait('Uploading archivo...', 'Uploading');
                }
                return (done && flag);
            };
            
          </script>
    </ext:XScript>     
</body>


</html>
